package com.chinaums.fsp.sdk.request;

import org.xiajinsuo.avro.specific.SpecificRecordBase;

import com.chinaums.fsp.base.pgt.TransType;
import com.chinaums.fsp.sdk.base.RequestData;
import com.chinaums.fsp.sdk.base.ResponseDataWrapper;
import com.chinaums.fsp.sdk.pgt.params.PledgeStatusModifyRequest; 
/**
 * 质押解押交易状态更新
 * @author hhh
 */
public class PledgeStatusModifyTest extends BaseRequest{

	public void testPledgeStatusModifyRequest1() throws Exception {
		
		PgtRequestFactory rf = FACTORY.factory();
		
		RequestData.Builder builder = this.createRequestDataBuilder();
		builder.setTransType(TransType.TRANSPLEDGE_STATUS_MODIFY.getTransCode());
		
		PledgeStatusModifyRequest data = PledgeStatusModifyRequest.newBuilder()
															.setOrigServerTransId("1301012017112221431946311446")
															.setTransType(1) // 1-质押 2-解押
															.setCheckStatus(1) // 0:待质押、待解押 1:待签收 2:待核验
															.build()
															;
		rf.transType(TransType.TRANSPLEDGE_STATUS_MODIFY.getTransCode())
		.responseClass(SpecificRecordBase.class)
		.data(data)
		;
		ResponseDataWrapper rdw = rf.post();
	
		this.print(rdw);
	}
	
	public void testPledgeStatusModifyRequest2() throws Exception {
		
		PgtRequestFactory rf = FACTORY.factory();
		
		RequestData.Builder builder = this.createRequestDataBuilder();
		builder.setTransType(TransType.TRANSPLEDGE_STATUS_MODIFY.getTransCode());
		
		PledgeStatusModifyRequest data = PledgeStatusModifyRequest.newBuilder()
															.setOrigClientTransId("20171122214318302983")
															.setTransType(1) // 1-质押 2-解押
															.setCheckStatus(0) // 0:待质押、待解押 1:待签收 2:待核验
															.build()
															;
		rf.transType(TransType.TRANSPLEDGE_STATUS_MODIFY.getTransCode())
		.responseClass(SpecificRecordBase.class)
		.data(data)
		;
		ResponseDataWrapper rdw = rf.post();
		
		this.print(rdw);
	}
	
	
}